import request from '@/utils/request'

// 查询角色菜单列表
export function listRoleMenu(query) {
  return request({
    url: '/product/roleMenu/list',
    method: 'get',
    params: query
  })
}

// 查询角色菜单详细
export function getRoleMenu(id) {
  return request({
    url: '/product/roleMenu/' + id,
    method: 'get'
  })
}

// 新增角色菜单
export function addRoleMenu(data) {
  return request({
    url: '/product/roleMenu',
    method: 'post',
    data: data
  })
}

// 修改角色菜单
export function updateRoleMenu(data) {
  return request({
    url: '/product/roleMenu',
    method: 'put',
    data: data
  })
}

// 删除角色菜单
export function delRoleMenu(id) {
  return request({
    url: '/product/roleMenu/' + id,
    method: 'delete'
  })
}

// 导出角色菜单
export function exportRoleMenu(query) {
  return request({
    url: '/product/roleMenu/export',
    method: 'get',
    params: query
  })
}